package com.wlyuan.index.domain.index.valueobj;

@Deprecated
public class CombineStatus {
    /**
     * 合单状态 10 待调度 20 已委托 30 已完成
     */
    public static Integer WAIT_DISPATCH = 10;
    public static Integer DISPATCHED = 20;
    public static Integer WAIT_ACCEPT = 21;
    public static Integer COMPLETED = 30;
    public static Integer CLOSED = 40;

    public static Integer apply(Integer character, Integer status) {
        if (DISPATCHED.equals(status)) {
            if (Characters.CARRIER.equals(character)) {
                return WAIT_ACCEPT;
            } else if (Characters.CUSTOMER.equals(character)) {
                return DISPATCHED;
            }
        }
        return status;
    }

    public static boolean endQuote(Integer status) {
        return CLOSED.equals(status);
    }

    public static boolean canQuote(Integer status) {
        return COMPLETED.equals(status);
    }
}
